Democratize Hybrid Cloud Automation
Overview
In this lab we will review how to create a self service portal for users to create their own virtual machines in different clouds.
The process of this RNA lab is the following:
Build a workflow that uses existing workflows to create instances in the cloud (see prerequirements section)
Create a tile in Automation Center to allow self service automation to users
Prerequirements
In order to complete this lab, it is required to have access to AWS, including free AWS accounts https://aws.amazon.com/free/
To access the AWS API, we will require to create an access key and secret key https://docs.aws.amazon.com/keyspaces/latest/devguide/access.credentials.html
This lab needs as a prerequirement the completion of the Self service AWS Instance and Automate Subnet Creation PoT lab finished and executed correctly.
Create Workflow
If AWS authentication has already been created, please skip this block of actions and continue to step 4.
Log into RNA
Go to Authentications
Click Create Authentication
a. Name: AWS
b. Service: AWS
c. Access Key Id: [Copy Access Key from AWS]
d. Secret Access Key: [Copy Secret Access Key from AWS]
Go to Workflows
Click Create Workflow
a. Name: Cloud Instance Self Service
b. Layout type: Sequence
Add variables to Start
a. cloud
i. Name: cloud
ii. Type: Enum
iii. Click in the 'Expand' icon:
{"type":"string","enum":["AWS","Azure","IBM","GCP"]}
iv. Default Value: "AWS"
v. In
vi. Requiredb. size
i. Name: size
ii. Type: Enum
iii. Click in the 'Expand' icon:
{"type":"string","enum":["Small","Medium","Large"]}
iv. Default Value: "Small"
v. In
vi. Requiredc. region
i. Name: region
ii. Type: String
iii. Click in the 'Expand' icon:
{"type":"string","enum":["US East","US West","Europe","Africa","Asia","Australia"]}
iv. Default Value: "US EAST"
v. In
vi. Requiredd. image
i. Name: region
ii. Type: Enum
iii. Click in the 'Expand' icon:
{"type":"string","enum":["Linux","Windows"]}
iv. Default Value: "Linux"
v. In
vi. Requirede. team
i. Name: team
ii. Type: Enum
iii. Click in the 'Expand' icon:
{"type":"string","enum":["Sales","Engineering"]}
iv. Default Value: "Engineering"
v. In
vi. Required
Change to Flow View
On the left hand side panel, Click on Common
Select "SwitchCase" and drop it after the building block START
a. Change name to SwitchCase_Cloud
b. Click on the building block to open the right side panel and complete the following fields
i. expression: $cloud
On Case-1, click on the box below
a. value: "AWS"
Click on + CASE, on Case-2 click on the box below
a. value: "Azure"
Click on + CASE, on Case-3 click on the box below
a. value: "IBM"
Click on + CASE, on Case-4 click on the box below
a. value: "GCP"
On Case-2, add a new building block, Common -> Assign
a. Change name to Assign_Azure
b. Click on the building block to open the right side panel and complete the following fields
i. variable: $result
ii. value: "Cloud not supported"On Case-3, add a new building block, Common -> Assign
a. Change name to Assign_IBM
b. Click on the building block to open the right side panel and complete the following fields
i. variable: $result
ii. value: "Cloud not supported"On Case-4, add a new building block, Common -> Assign
a. Change name to Assign_GCP
b. Click on the building block to open the right side panel and complete the following fields
i. variable: $result
ii. value: "Cloud not supported"On Case-1, add a new building block, Common -> SwitchCase
a. Change name to SwitchCase_Size
b. Click on the building block to open the right side panel and complete the following fields
i. expression: $size
On Case-1, click on the box below:
a. value: "Small"
On Case-1 of the SwitchCase_Size, add a new building block, Common -> Assign
a. Change name to Assign_size
b. Click on the building block to open the right side panel and complete the following fields
i. variable: $newsize
ii. value: "t2.micro"On Default of the SwitchCase_Size, add a new building block, Common -> Assign
a. Change name to Assign_size_1
b. Click on the building block to open the right side panel and complete the following fields
i. variable: $newsize
ii. value: "t3.micro"
After the END of SwitchCase_Size, add a new building block, Common -> SwitchCase
a. Change name to SwitchCase_Image
b. Click on the building block to open the right side panel and complete the following fields
i. expression: $image
On Case-1, click on the box below
a. value: "Linux"
On Case-1 of the SwitchCase_Image, add a new building block, Common -> Assign
a. Change name to Assign_Image
b. Click on the building block to open the right side panel and complete the following fields
i. variable: $newimage
ii. value: "ami-00006bfaf3dd954f3"On Default of the SwitchCase_Image, add a new building block, Common -> Assign
a. Change name to Assign_image_1
b. Click on the building block to open the right side panel and complete the following fields
i. variable: $newimage
ii. value: "ami-00009114fa9ca2a86"
After the END of SwitchCase_Image, add a new building block, Common -> SwitchCase
a. Change name to SwitchCase_Region
b. Click on the building block to open the right side panel and complete the following fields
i. expression: $region
On Case-1, click on the box below
a. value: "US East"
On Case-1 of the SwitchCase_Region, add a new building block, Common -> Assign
a. Change name to Assign_Region
b. Click on the building block to open the right side panel and complete the following fields
i. variable: $newregion
ii. value: "us-east-1"On Default of the SwitchCase_Region, add a new building block, Common -> Assign
a. Change name to Assign_region_1
b. Click on the building block to open the right side panel and complete the following fields
i. variable: $newregion
ii. value: "us-west-1"
After the END of SwitchCase_Image, add a new building block, User -> AWS Self Service Instance
a. Change name to AWS_self_service_instance
b. Click on the building block to open the right side panel and complete the following fields
i. size: $newsize
ii. image: $newimage
iii. AWSCredentials: "admin/AWS"
iv. region: $newregion
v. team: $teamAdd a new building block, Common -> Assign
a. Change name to Assign_result
b. Click on the building block to open the right side panel and complete the following fields
i. variable: $result
ii. value: $AWS_self_service_instance.resultIf there are other Assign blocks, please disable/delete them.
Save workflow
Create Self Service Portal
Go to Automation Center
Click on Create Panel
a. Title: Cloud Self Service
b. Click Create
Click on the new panel created, and click on Create Tile
a. Select workflow: admin/User/Cloud Instance Self Service
b. Click Next
c. Title: Request Cloud Instance
d. Description: This tile allows you to request a new cloud instance
e. Click Next
f. Click Create
Click on the Request Cloud Instance tile to test the process
a. Leave the options as default
b. Click Execute
- Go to AWS to check if the instance has been created correctly
NOTE: InstanceId from the last two screenshots should match
Terminate the instance as soon as you have finished reviewing the lab so you don't get charged